home *** CD-ROM | disk | FTP | other *** search
- Squirrel Query Front End
- ========================
-
- This utility can provide a general purpose front end to commonly used
- queries where only one parameter varies. The SqlFront program and the
- SFTemplate file are common to all uses of the utility and can be
- stored in the Library directory or other common resource area. The
- pathname SqlLib in the !Run file must be amended accordingly.
-
- Apart from these the utility requires a suitable Query file or
- files and an optional Description file which must be called 'desc'. If
- the output type is 'query' then the Query file must be called
- 'Queryfile'. If the output type is 'report' there must be two Query
- files called 'Preview' and 'Print'. If different sprites are to be
- used for the icon bar sprite and within the Front End window these
- should be held in a suitable Sprite file and placed in the Sprite Pool
- using an 'Iconsprites' call.
-
- The Description file is a text file which must include a block of
- statements each on a new line, enclosed between 'begin' and 'end.' (NB
- the full stop.) Any text may be added outside this block. The file
- must end with a carriage return. Each statement consists of a label
- and a value separated by a colon. Any additional spaces are ignored.
- The order of the labels is not significant and all statements are
- optional. Any missing values will be supplied from a default list.
- Values may be enclosed in double quotes.
-
- Valid labels and their value meanings are:
-
- output - the type of output (must be either 'query' or
- 'report' - default is 'query')
- input - the type of input (must be either 'none' or
- 'writable' - default is 'writable')
- iconbarsprite - the name of the sprite used on the icon bar (default
- is not to install the utility on the icon bar)
- titlebar - the text in the Front End window's title bar
- (default 'Squirrel Front End')
- heading1 - the left hand heading (default 'Squirrel')
- heading2 - the right hand heading (default 'Query')
- sprite - the name of a sprite positioned between the headings
- (default '!squirrel')
- prompt - an instruction to the user (default 'Enter search
- value and click OK:')
- field - the name of the query field. If this parameter is
- not provided only the search value is passed to the
- query. For string fields, two field names may be
- given separated by a comma.
- type - the field type of the query field (default 'string')
- case - the field's case (must be 'mixed', 'upper','lower',
- or 'none' - default 'mixed')
-
- In order to use the value entered, the Query filter must contain the
- system variable @User$Query. Allowable field types are string,
- number, text, date and boolean. If the type is 'string', the operator
- used is LIKE and a % is automatically added to the value. If two
- fieldnames are specified the user may enter values for two fields
- separated by a space. If no second value is given it is the SECOND
- fieldname which is used. If the type is 'text' the search is
- automatically a sliding search of the whole field. For all other
- types, the operator used is =. Provided a fieldname is supplied the
- filter box should contain only: @User$Query. If a fieldname is not
- supplied, the filter box will contain something like:
- name = @User$Query
- NB quote marks should not be included.
-
- Listed below is an example Description file with all the parameters
- specified.
-
- # Description file for General Purpose Query Front End
-
- begin
- output : query
- input : writable
- iconbarsprite : !findpupil
- titlebar : Find Pupil
- heading1 : Crozier Academy
- heading2 : Pupil Records
- sprite : crozier
- prompt : Enter (given name and) surname and click OK:
- field : given_name,surname
- type : string
- case : mixed
- end.
-